<?php
    $twitterControl = new Model_Blocks_Twitter();
    $twitterSettings = explode(",",$blockSettings['setting']);
    $tweetFeed = $twitterControl->getMainTimeline($twitterSettings[0],$twitterSettings[1],$twitterSettings[2]);

    if(isset($tweetFeed->error)){
        echo $tweetFeed->error;
    } else {
        $tweets = $tweetFeed->xpath('status');

        foreach($tweets as $tweet){ ?>
            <div class="tweet">
                <?php echo $tweet->text; ?>
                <hr />
                <span class="details">
                    <?php
                        echo __('By');
                        echo " ";
                        echo $tweet->user->name;
                        echo ", ";
                        echo __('at');
                        echo " ";
                        echo $tweet->created_at;
                        echo ", ";
                        echo __('using');
                        echo " ";
                        echo $tweet->source;
                        if($tweet->in_reply_to_screen_name != ''){
                            echo ", ";
                            echo __('in reply to').": ".$tweet->in_reply_to_screen_name;
                        }
                    ?>
                </span>
            </div><?php
        }
    }
?>